A. Technical Field
The present invention relates to programming memory on a semiconductor chip. More particularly, this invention relates to writing data to and reading data from an EEPROM (electrically erasable programmable read-only memory).
B. Related Art
1. In-System Programming (ISP)
An EEPROM is typically programmed by inserting the EEPROM chip into a socket of a PROM programmer machine. The EEPROM is then mounted on a circuit board of a system (i.e. the system board). Subsequently, if it is desired to re-program the EEPROM, then the EEPROM would typically be removed from the system board and re-inserted into the socket of the PROM programmer. This need to remove the EEPROM from the system board in order to re-program the EEPROM is a disadvantage which may slow-down product development, hinder in-field upgrades/bug fixes, and increase the amount of chips that need to be over-stocked in order to facilitate upgrades/bug fixes.
In-System Programming (ISP) refers to the capability of programming or re-programming a chip while the chip is in place mounted on the system board. In-System Programming allows for speedier product development and facilitates the process of upgrading/fixing bugs in the programming of a chip in a system.
For example, consider developing a microcontroller system including a microcontroller with on-chip EEPROM for storing the programming. With ISP, developing the microcontroller system becomes simpler and faster. During program development, codes in the EEPROM may be updated while the microcontroller is in the actual system board (or a prototype of the system board). The EEPROM may be programmed and re-programmed over many iterations until the program functions as desired and the bugs are fixed. On the other hand, without ISP, the microcontroller has to be removed from the system board and plugged into the separate PROM programmer for each iteration. Since the microcontroller has to be removable from the system board, it is typically socketed instead of soldered onto the system board during development. Not soldering the microcontroller to the system board may complicate the debugging of timing sensitive or noise sensitive designs because of the differences between the soldered and socketed connections.
In addition to the above advantages during development, there are also advantages during manufacturing for such a microcontroller capable of ISP. The system board may be manufactured with the microcontroller permanently mounted before the programming is finalized in order to facilitate a rapid time-to-market Moreover, additional information not available early in the production cycle, such as the vendor identification, may be added to the program at the end of the production cycle. Furthermore, the microcontroller chips do not need to be pre-programmed before production, and pre-programmed microcontroller chips can still be used and re-programmed easily. After production, the microcontroller system can be easily upgraded or fixed in the field with ISP.
2. Prior ISP Techniques
Prior ISP techniques may be grouped into two categories. One category utilizes the JTAG (Joint Technical Assessment Group) boundary scan standard (IEEE 1149.1). Like other parts of the system, the microcontroller may be made to be programmable by a JTAG tester. However, JTAG testers are relatively expensive and are typically used in production but not in development. Furthermore, four additional pins are generally required to implement JTAG.
The other category includes various non-standard techniques which generally utilize an ISP clock pin and an ISP data pin on the microcontroller to send/receive data. The ISP data and clock pins are generally either two pins dedicated to such use, or they are two pins which function as I/O (input/output) pins during normal operation of the microcontroller but function as the ISP data and the ISP clock pins during In-System Programming. However, using two dedicated pins is expensive, and multiplexing usage of regular I/O pins typically requires extra circuitry to isolate the regular I/O circuitry from the ISP circuitry.